#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include"List.h"
using namespace std;

int main()
{
	tianci::list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(4);
	lt1.push_front(5);
	lt1.push_front(6);
	lt1.pop_back();
	lt1.pop_front();
	
	tianci::list<int> lt2(lt1.begin(), lt1.end());
	auto it1 = lt2.begin();

	while (it1 != lt2.end())
	{
		cout << *it1 << " ";
		++it1;
	}
	cout << endl;
	cout << lt2.front() << endl;
	cout << lt2.back() << endl;

	auto it2 = lt1.rbegin();
	while (it2 != lt1.rend())
	{
		cout << *it2 << " ";
		++it2;
	}
	cout << endl;

	return 0;
}